package com.example.pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.support.FindBy;


public abstract class UsersPage extends Page {
	
	
	private By driver;

	public void newUser(String nameNewUser, String emailNewUser, String password1, String password2) {
		driver.findElement(By.id)(By.linkText("User management")).click();
		driver.findElement(By.id("username")).clear();
	    driver.findElement(By.id("username")).sendKeys(nameNewUser);
	    driver.findElement(By.name("email")).clear();
	    driver.findElement(By.name("email")).sendKeys(emailNewUser);
	    driver.findElement(By.id("password")).clear();
	    driver.findElement(By.id("password")).sendKeys(password1);
	    driver.findElement(By.id("password2")).clear();
	    driver.findElement(By.id("password2")).sendKeys(password2);
	    driver.findElement(By.name("submit")).click();
	}
	
}
